require 'migration_helpers'

class CreateCommunications < ActiveRecord::Migration
  extend MigrationHelper::ForeignKeys
  
  def self.up
    create_table :communications do |t|
      t.column :communication_type_id, :integer
      t.column :student_id, :integer
      t.column :notes, :text
    end
    
    add_foreign_key(:communications, :communication_type_id, :communication_types)
    add_foreign_key(:communications, :student_id, :students)
  end

  def self.down
    drop_table :communications
  end
end
